﻿<navigation:Page
x:Class="MedLink2011.Views.ClinicCharts.Controls.ClinicChartsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
mc:Ignorable="d"
x:Name="ClinicChartControlUI"
Background="AliceBlue"
xmlns:E2C="clr-namespace:MedLink2011.Core"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:viewModels="clr-namespace:MedLink2011.Views.ClinicCharts.ViewModels" 
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
xmlns:appControls="clr-namespace:MedLink2011.Controls" 
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView">
<!--8 Fields --> 
<UserControl.Resources>
<viewModels:ClinicChartViewModel x:Key="ClinicChartViewModel" ></viewModels:ClinicChartViewModel>
 <LinearGradientBrush x:Key="Windows7RowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
 <GradientStop Color="#FFF7FBFF"/>
 <GradientStop Color="#FFDCE7F5" Offset="1"/>
 <GradientStop Color="#FFDFE9F6" Offset="0.494"/>
 </LinearGradientBrush>
 <ControlTemplate x:Key="MyCustomTelerikRowTemplate" TargetType="GridView:GridViewRow">
 <Border x:Name="rowsContainer" BorderBrush="#FFA0AFC3"
 Background="{StaticResource Windows7RowBackground}" BorderThickness="0,0,0,1">
 <Grid Width="Auto" HorizontalAlignment="Stretch">
 <Grid.RowDefinitions>
 <RowDefinition Height="Auto"/>
 <RowDefinition Height="Auto"/>
 </Grid.RowDefinitions>
 <Grid.ColumnDefinitions>
 <ColumnDefinition Width="Auto" />
 <ColumnDefinition Width="Auto" />
 </Grid.ColumnDefinitions>
 <StackPanel Grid.Column="0" Grid.Row="0" Orientation="vertical" Margin="5" >


<TextBlock Height="20" telerik1:StyleManager.Theme="Windows7" Text="Clinic Chart Id:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap" />
<TextBlock Height="20" telerik1:StyleManager.Theme="Windows7" Text="Clinic Chart Description:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap"  />
<TextBlock Height="20" telerik1:StyleManager.Theme="Windows7" Text="Clinic Chart Extra Info:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap"  />

</StackPanel>
<StackPanel  Grid.Column="1" Grid.Row="0" Orientation="vertical" Margin="5" >
<!-- uno -->
<TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding ClinicChart_Id}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />
<TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding Clinic_Chart_Description}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />
<TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding Clinic_Chart_Extra_info}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />

 </StackPanel>
 </Grid>
 </Border>
 </ControlTemplate>
 <Style x:Key="rowStyle" TargetType="GridView:GridViewRow">
 <Setter Property="Template" Value="{StaticResource MyCustomTelerikRowTemplate}" />
 </Style>
</UserControl.Resources>

 <appControls:BusyIndicator telerik1:StyleManager.Theme="Windows7" x:Name="BusyIndicator" BusyContent="Loading ClinicCharts data...." DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" Foreground="SlateGray" IsBusy="{Binding IsBusy}">
 <Grid x:Name="LayoutRoot"  DataContext="{Binding Source={StaticResource ClinicChartViewModel}}">
 <Border BorderBrush="#FF505050" BorderThickness="2" CornerRadius="3">
 <Border.Background>
 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
 <GradientStop Color="#ED71A5D8" Offset="0.8" />
 <GradientStop Color="AliceBlue" Offset="1.09" />
 </LinearGradientBrush>
 </Border.Background>
 <ScrollViewer  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
 <Grid HorizontalAlignment="Left" x:Name="ClinicChartsGrid" VerticalAlignment="Top" >
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
 <ColumnDefinition Width="30" />
 <ColumnDefinition Width="Auto" />
 <ColumnDefinition Width="Auto" />
 <ColumnDefinition Width="60" />
 <ColumnDefinition Width="400*" />
</Grid.ColumnDefinitions>



<!-- sopas -->
    <StackPanel Grid.Column="1" Grid.Row="1" Orientation="vertical"  >
<!-- dos -->
<TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Id" ToolTipService.Placement="Mouse" Text="Clinic Chart Id:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Verdana" FontSize="10.667" TextTrimming="None" />
<TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Description" ToolTipService.Placement="Mouse" Text="Clinic Chart Description:"   HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Verdana" FontSize="10.667" TextTrimming="None" />
<TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Extra Info" ToolTipService.Placement="Mouse" Text="Clinic Chart Extra Info:"   HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Verdana" FontSize="10.667" TextTrimming="None" />
<TextBlock Height="30" ToolTipService.ToolTip="Patient Id" ToolTipService.Placement="Mouse" Text="Patient Id:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Verdana" FontSize="10.667" TextTrimming="None" />


</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="1" Orientation="vertical"  >
<!-- tres -->
<TextBlock  Height="30" HorizontalAlignment="Left" Margin="1" Text="{Binding CurrentClinicChart.ClinicChart_Id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" FontWeight="Bold" />
<TextBox telerik1:StyleManager.Theme="Windows7" ToolTipService.ToolTip="Clinic Chart Description" ToolTipService.Placement="Mouse" Height="30" HorizontalAlignment="Left" Margin="1"  Text="{Binding CurrentClinicChart.Clinic_Chart_Description, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" HorizontalContentAlignment="Left"  MaxLength="200"/>
<TextBox telerik1:StyleManager.Theme="Windows7" ToolTipService.ToolTip="Clinic Chart Extra Info" ToolTipService.Placement="Mouse" Height="30" HorizontalAlignment="Left" Margin="1"  Text="{Binding CurrentClinicChart.Clinic_Chart_Extra_info, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" HorizontalContentAlignment="Left"  MaxLength="200"/>

<ComboBox  ItemsSource="{Binding PatientCollection, Mode=TwoWay}" DisplayMemberPath = "First_Name" SelectedItem="{Binding SelectedPatient, Mode=TwoWay}" x:Name="Patient_IdComboBox"  VerticalAlignment="Top" Width="180" FontSize="15" Background="#FFFCF6EA" Height="30" Foreground="Black" Margin="1">
<ComboBox.BorderBrush>
<SolidColorBrush Color="#FF0E1601"/>
</ComboBox.BorderBrush>
</ComboBox>


</StackPanel>



                        <StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal"  Grid.ColumnSpan="5">
                            <Button   x:Name="printButton" Content="Imprimir" Margin="0,10,5,5" Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding PrintClinicChartCommand}"  />
                            <Button  x:Name="addButton" Content="Agregar Nueva" Margin="5,10,5,5" Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding AddNewClinicChartCommand}" />
                            <Button   x:Name="saveButton" Content="Guardar" Margin="5,10,5,5"  Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding SaveClinicChartCommand}"  />
                            <Button   x:Name="deleteButton" Content="Eliminar" Margin="5,10,5,5" Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding DeleteClinicChartCommand}" />
                        </StackPanel>
                        
<StackPanel Grid.Column="4" Grid.Row="1" Orientation="vertical"  >
<!-- cuatro -->
<!--<Controls:RadDataPager telerik1:StyleManager.Theme="Windows7" Height="33" x:Name="ClinicChartDataPager" PageSize="5" Margin="1,-5,1,1"  Source="{Binding Items, ElementName=ClinicChartDataGrid}" DisplayMode="FirstLastPreviousNext" AutoEllipsisMode="Both" NumericButtonCount="0" IsTotalItemCountFixed="True" Style="{StaticResource RadDataPagerStyle1}"/>-->

<telerik:RadGridView telerik1:StyleManager.Theme="Windows7" ShowColumnHeaders="False" RowStyle="{StaticResource rowStyle}" MinHeight="200" Width="400" Height="200" ShowGroupPanel="False" CanUserFreezeColumns="False" ScrollMode="RealTime"  IsFilteringAllowed="False"   AutoGenerateColumns="False" IsReadOnly="True" GridLinesVisibility="None" DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" ItemsSource="{Binding ClinicChartCollection, Mode=TwoWay}" x:Name="ClinicChartDataGrid" Style="{StaticResource  RadGridViewStyle1}"   >
                             <i:Interaction.Triggers>
                                <i:EventTrigger EventName="SelectionChanged">
                                    <E2C:EventToCommand Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                </i:EventTrigger>
                                <i:EventTrigger EventName="RowLoaded">
                                    <E2C:EventToCommand Command="{Binding RowLoadedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                            <telerik:RadGridView.Columns >

<telerik:GridViewDataColumn x:Name="ClinicChart_IdColumn" DataMemberBinding="{Binding ClinicChart_Id}" Header="Clinic Chart Id" Width="SizeToHeader" />
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>

    
   
    
    
    
    
    
</StackPanel>
    <!-- 1 -->
                    </Grid>
                </ScrollViewer>
            </Border>
        </Grid>
    </appControls:BusyIndicator>
</navigation:Page>
<!--
Evaluation_Cardios
Evaluation_Constitutionals
Evaluation_Ents
Evaluation_Extrems
Evaluation_Gastros
Evaluation_Lymphs
Evaluation_Muscs
Evaluation_Necks
Evaluation_Neuros
Evaluation_Respis
Evaluation_Skins
Hereditary_Illnes

Now Parent Rels 

Patients

14
-->
